package file;

import java.io.File;

/**
 * 对file判断是文件还是目录的操作
 */
public class FileDemo2 {
    public static void main(String[] args) {
        File file = new File("./demo.txt");
      //  File file = new File("./a");
        System.out.println("demo.txt 是文件吗？"+file.isFile());
        System.out.println("demo.txt 是目录吗？（是文件夹么）"+file.isDirectory());
    }
}
